<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .box {
      position: relative;
      width: 200px;
      height: 200px;
      /* border: 1px solid red; */
      transform: rotate3d(1, 1, 0, 30deg);
      transform-style: preserve-3d;
      perspective: 700px;
      perspective-origin: 0px 0px;
    }
    .box > div {
      width: 100%;
      height: 100%;
      position: absolute;
      opacity: 0.5;
      text-align: center;
      line-height: 200px;
    }
    .box .front:nth-child(1) {
      background-color: aqua;
      transform: translateZ(100px);
    }
    .box .back:nth-child(2) {
      background-color: green;
      transform: translateZ(-100px);
    }
    .box .left:nth-child(3) {
      background-color: blue;
      transform: translateX(-100px) rotateY(-90deg);
    }
    .box .right:nth-child(4) {
      background-color: skyblue;
      transform: translateX(100px) rotateY(90deg);
    }
    .box .top:nth-child(5) {
      background-color: seagreen;
      transform: translateY(-100px) rotateX(90deg);
    }
    .box .bottom:nth-child(6) {
      background-color: yellow;
      transform: translateY(100px) rotateX(-90deg);
    }

  </style>
</head>
<body>
  <div class="box">
    <div class="face front">前</div>
    <div class="face back">后</div>
    <div class="face left">左</div>
    <div class="face right">右</div>
    <div class="face top">上</div>
    <div class="face bottom">下</div>
  </div>
</body>
</html>